<div id="basicListing">
<h1>This Week's Events</h1>
<span id="printThis"><%= link_to_function("print", "javascript:print()") %></span>
<% @traces_by_day_this_week.each do |day,traces| %>
    <ul><b><%= day.strftime("%A (%m/%d/%Y)") %></b>
    <% @minToday = traces.sum(&:minSpent) %>
    <% @sortedDay = traces.sort! {|x,y| x.event_id <=> y.event_id } %>
    <% @groupedTraces = @sortedDay.group_by{|e| e.event} %>
      <% @groupedTraces.each do |eventThisDay,tracesThisEvent| %>
        <li>
        <% @minThisEvent = tracesThisEvent.sum(&:minSpent) %>
        <%= "%02d:%02d" % [(@minThisEvent / 60),(@minThisEvent % 60)] %> / <%= (@minThisEvent.to_f/60).round(2) %>
        <%= eventThisDay.title %> (<%= eventThisDay.ticketNumber %>)
        </li>
      <% end %>
      <li>Total: <%= "%02d:%02d" % [(@minToday / 60),(@minToday % 60)] %></li>
    </ul>
<% end %>

</div>